package com.xinweisi.dataserver;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

import java.util.Date;
import java.util.TimeZone;

@Slf4j
@SpringBootApplication
public class DataServerApplication {

    public static void main(String[] args) {
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
        System.out.println("------------------------"+new Date());
        ConfigurableApplicationContext context = SpringApplication.run(DataServerApplication.class, args);
        Environment environment = context.getBean(Environment.class);
        System.out.println("****************************************************************");
        System.out.println("*                                                              *");
        System.out.println("*                       启动数据抽取服务                        *");
        System.out.println("*                                                              *");
        System.out.println("*                       服务端口号"+environment.getProperty("server.port")+"                         *");
        System.out.println("*                                                              *");
        System.out.println("****************************************************************");
    }
}
